var app = getApp()
//常量数据配置
var ConstantData = require('../../../../../../../common/constant_data.js')
var uitl = require('../../../../../../../utils/util.js')
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
     

    wx.showLoading({
      title: '加载中...',
      mask: true
    });
    var that = this;
    var lbmId = options.lbmId;
    var hospitalName = options.hospitalName;
    that.setData({
      hospitalName: hospitalName
    })

    app.executeRequest(function (header) {
      wx.request({
        url: ConstantData.CONSTATNT_DATA.BASE_URL + '/lease_admin/maintain/check_one_minute',
        data: {
          lbmId: lbmId
        },
        header: header,
        success: function (res) {
          getApp().hideLoading();
          if (res.data.result === 0) {
            var pipleList = res.data.data;
            for (let i = 0; i < pipleList.length; i++) {
              pipleList[i].update_time = uitl.timestampToTime(pipleList[i].update_time);
            }
            that.setData({
              pipleInfoList: res.data.data,
              homingStatInfo: res.data.pipleStatInfo
            })
          }
          that.setData({
            noDataDesc:"尚未发现弹不开的桩"
          });
        }
      })
    });  


  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})